package com.yixun.qfbao.apidto;

import com.yixun.qfbao.annotation.Constants;
import com.yixun.qfbao.annotation.TYWValid;
import com.yixun.qfbao.apidto.base.CommonReqDTO;
import com.yixun.qfbao.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class GetAgentReportPageReqDto extends CommonReqDTO {
    /**
     * 页码
     */
    @TYWValid(min = 1,max = 20, regModel = Constants.NUMBER)
    private Integer pageNo;
    /**
     * 页数
     */
    @TYWValid(min = 1,max = 20, regModel = Constants.NUMBER)
    private Integer pageSize;
    //楼盘名称
    private Long premisesId;
    //合作机构
    private Long orgId;
    //门店
    private Long storeId;
    //组别
    private Long groupId;
    //是否显示机构直属经纪人
    private boolean underOrg;
    //是否显示门店直属经济人
    private boolean underStore;
    //是否显示组别直属经纪人
    private boolean underGroup;
    //开始时间
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    private Date beginDate;
    //结束时间
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    private Date endDate;
    //楼盘状态
    private String saleStatus;
    //有效数据校验（是否过滤全是0的数据）
    private boolean validateData;


    public Long getPremisesId() {
        return premisesId;
    }

    public void setPremisesId(Long premisesId) {
        this.premisesId = premisesId;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public boolean isUnderOrg() {
        return underOrg;
    }

    public void setUnderOrg(boolean underOrg) {
        this.underOrg = underOrg;
    }

    public boolean isUnderStore() {
        return underStore;
    }

    public void setUnderStore(boolean underStore) {
        this.underStore = underStore;
    }

    public boolean isUnderGroup() {
        return underGroup;
    }

    public void setUnderGroup(boolean underGroup) {
        this.underGroup = underGroup;
    }

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate =  DateUtils.getCurrentMidnight(beginDate) ;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = DateUtils.getCurrentMidnight(endDate);
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getSaleStatus() {
        return saleStatus;
    }

    public void setSaleStatus(String saleStatus) {
        this.saleStatus = saleStatus;
    }

    public boolean isValidateData() {
        return validateData;
    }

    public void setValidateData(boolean validateData) {
        this.validateData = validateData;
    }
}
